home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Productivity Pak 2 / rerun-productivity-pak-ii.d64 / 1670 autodial (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  177 lines

  1. 10 rem ********************************
  2. 20 rem ******** 1670 autodial *********
  3. 30 rem ********************************
  4. 40 rem ************* by ***************
  5. 50 rem ********************************
  6. 60 rem ******** david bradley *********
  7. 70 rem ********************************
  8. 80 :
  9. 90 open2,2,0,chr$(6)+chr$(0)
  10. 100 rem open15,8,15,"s0:1670":close15:save"1670",8:verify"1670",8
  11. 110 print#2,"[193][212][214]0"
  12. 120 :
  13. 130 rem      *********************
  14. 140 rem      *** variable list ***
  15. 150 rem      *********************
  16. 160 :
  17. 170 rem a$  = input from modem
  18. 180 rem er  = modem no respond time-out
  19. 190 rem l   = sound routine counter
  20. 200 rem s   = sid reference value
  21. 210 rem xx  = time delay
  22. 220 rem ab  = abort check
  23. 230 rem ab$ = abort get
  24. 240 rem i   = time delay/misc counter
  25. 250 rem g$  = yes/no
  26. 260 rem nu$ = number to dial
  27. 270 rem ms$ = modem status
  28. 280 rem na  = number of attempts
  29. 281 rem pt$ = pulse or tone
  30. 282 rem pt  = pulse or tone
  31. 290 :
  32. 300 rem      *************
  33. 310 rem      *** setup ***
  34. 320 rem      *************
  35. 330 :
  36. 340 print"[147]"
  37. 350 printchr$(14),chr$(8)
  38. 360 xx=0
  39. 370 a$=""
  40. 380 ab$=""
  41. 390 er=0
  42. 400 g$=""
  43. 410 i=0
  44. 420 l=0
  45. 430 s=0
  46. 440 nu$=""
  47. 450 ms$=""
  48. 460 na=1
  49. 470 ab=0
  50. 480 poke53280,0
  51. 490 poke53281,0
  52. 500 print""
  53. 510 :
  54. 520 rem      *************
  55. 530 rem      *** start ***
  56. 540 rem      *************
  57. 550 :
  58. 560 xx=250:gosub1260:ifpt$=""thengosub1650
  59. 570 print"      1670 [193]utodial [194]y [196]avid [194]radley"
  60. 580 print"      ------------------------------"
  61. 590 print"([208]ress [210][197][212][213][210][206] [212]o [209]uit)"
  62. 600 print"[201][206][208][213][212] [206]umber [212]o ";pt$;" [196]ial*[157][157][157]";
  63. 610 input nu$
  64. 620 fori=1tolen(nu$)
  65. 630 ifmid$(nu$,i,1)="#"then675
  66. 640 ifmid$(nu$,i,1)="*"then675
  67. 650 ifmid$(nu$,i,1)="-"then675
  68. 660 ifasc(mid$(nu$,i,1))>57then690
  69. 670 ifasc(mid$(nu$,i,1))<48then690
  70. 675 nexti
  71. 680 goto700
  72. 690 gosub1340:print"[197]rror [201]n [206]umber [201]nput...[210]e-[197]nter.":xx=1000:gosub1260:goto340
  73. 700 if nu$="*"thenprint"[209]uit? ([217]/[206])                 ":goto720
  74. 710 goto760
  75. 720 getg$
  76. 730 ifg$=""then720
  77. 740 ifg$="y"thenprint"[147]":end
  78. 750 goto340
  79. 760 iflen(nu$)<7thengoto850
  80. 770 iflen(nu$)>30thengoto790
  81. 780 goto920
  82. 790 gosub1340:print"";nu$:print"[201]s [193] [194]it [204]ong               "
  83. 800 print"[196]ial [193]nyway?"
  84. 810 getg$
  85. 820 if g$=""then810
  86. 830 if g$<>"y"thenprint"[147]":goto570
  87. 840 goto920
  88. 850 gosub1340:print"";nu$;" [201]s [204]ess [212]han 7 [196]igits!"
  89. 860 xx=500:gosub1260
  90. 870 print"[196]ial [193]nyway?"
  91. 880 getg$
  92. 890 if g$=""then880
  93. 900 if g$<>"y"thenprint"[147]":goto570
  94. 910 ifab=1thengoto1130
  95. 920 print"[196]ialing ";nu$;" [193]ttempt [206]umber:";na
  96. 930 print"[212]o [193]bort [196]ialing [207]peration [208]ress [193]ny [203]ey"
  97. 940 print"                 [193]nd [215]ait               "
  98. 950 print""
  99. 955 ifpt<>0then965
  100. 960 print#2,"[193][212][196][212]";nu$
  101. 965 print#2,"[193][212][196][208]";nu$
  102. 970 na=na+1
  103. 980 get#2,a$
  104. 990 getab$:ifab$<>""thenab=1
  105. 1000 er=er+1
  106. 1010 ifer>2500thenms$="":print"[206][207] [195][193][210][210][201][197][210]":er=0:xx=500:gosub1260:goto910
  107. 1020 ifa$=""then980
  108. 1030 ms$=ms$+a$
  109. 1040 ifa$=chr$(102)then1120
  110. 1050 ifa$=chr$(179)then1120
  111. 1060 ifa$=chr$(177)then1190
  112. 1070 ifa$=chr$(98)then1190
  113. 1080 getab$:ifab$<>""thenab=1
  114. 1090 er=er+1
  115. 1100 ifer>2500thenms$="":print"[206][207] [195][193][210][210][201][197][210]":er=0:xx=500:gosub1260:goto910
  116. 1110 goto980
  117. 1120 print"[206][207] [195][193][210][210][201][197][210]":ms$=""
  118. 1130 ifab=1thenab=0:print"*** [193]borting ***":xx=1500:gosub1260:goto340
  119. 1140 xx=500:gosub1260
  120. 1150 print"                  "
  121. 1160 print"[196]ialing ";nu$;" [193]ttempt [206]umber:";na;""
  122. 1170 er=0
  123. 1180 goto960
  124. 1190 print"[195][207][206][206][197][195][212]":na=0:ms$="":gosub1340
  125. 1200 print"[204]oading [210][213][206][212][197][210][205] [208][204][213][211]"
  126. 1210 load"runterm plus",8
  127. 1220 end
  128. 1230 rem *****************************
  129. 1240 rem *** time delay subroutine ***
  130. 1250 rem *****************************
  131. 1260 fori=1toxx
  132. 1270 nexti
  133. 1280 return
  134. 1290 :
  135. 1300 rem *****************************
  136. 1310 rem *** alarm/bell subroutine ***
  137. 1320 rem *****************************
  138. 1330 :
  139. 1340 s=54272
  140. 1350 forl=0to24
  141. 1360 pokes+l,0
  142. 1370 nextl
  143. 1380 pokes+1,100
  144. 1390 pokes+5,10
  145. 1400 pokes+15,255
  146. 1410 pokes+24,15
  147. 1420 pokes+4,21
  148. 1430 gosub1550
  149. 1440 xx=500:gosub1260
  150. 1450 pokes+24,0
  151. 1460 forl=0to24
  152. 1470 pokes+l,0
  153. 1480 nextl
  154. 1490 return
  155. 1500 :
  156. 1510 rem *****************************
  157. 1520 rem ***    screen blanking    ***
  158. 1530 rem *****************************
  159. 1540 :
  160. 1550 poke53265,100
  161. 1560 xx=250:gosub1260
  162. 1570 poke53265,27
  163. 1580 xx=250:gosub1260
  164. 1590 return
  165. 1600 :
  166. 1610 rem *****************
  167. 1620 rem * pulse or tone *
  168. 1630 rem *****************
  169. 1640 :
  170. 1650 print"[215]ould [217]ou [204]ike [212]o [196]ial [208][146]ulse or [212][146]one?"
  171. 1660 getpt$:ifpt$=""then1660
  172. 1670 ifpt$<>"p"andpt$<>"t"then1650
  173. 1680 ifpt$="t"thenpt=0:pt$="[212]one"
  174. 1690 ifpt$="p"thenpt=1:pt$="[208]ulse"
  175. 1700 print"[147]"
  176. 1710 return
  177.